From: Wei Liu Date: Wed, 26 Apr 2017 15:28:37 +0000 (+0100) Subject: x86/pv/domain: clean up switch_compat X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2068 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=5c3dd032286e9084cd5d09b1945d69365a4d3d6e;p=xen.git x86/pv/domain: clean up switch_compat Remove the redundant is_pv_domain check. Rearrange setup_compat calls. Suggested-by: Andrew Cooper Signed-off-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/pv/domain.c b/xen/arch/x86/pv/domain.c index 4bd65819f7..1c0c040ca0 100644 --- a/xen/arch/x86/pv/domain.c +++ b/xen/arch/x86/pv/domain.c @@ -60,16 +60,12 @@ int switch_compat(struct domain *d) return 0; d->arch.has_32bit_shinfo = 1; - if ( is_pv_domain(d) ) - d->arch.is_32bit_pv = 1; + d->arch.is_32bit_pv = 1; for_each_vcpu( d, v ) { - rc = setup_compat_arg_xlat(v); - if ( !rc ) - rc = setup_compat_l4(v); - - if ( rc ) + if ( (rc = setup_compat_arg_xlat(v)) || + (rc = setup_compat_l4(v)) ) goto undo_and_fail; }